﻿#ifndef INSTRUCTIONLOOP
#define INSTRUCTIONLOOP
#include "ScriptInstruction.h"

class InstructionLoop :public ScriptInstruction
{
  Q_OBJECT
private://property
  int loopCount = 0;
  int instructionCount = 0;
private:
  static const int byteArraySize=sizeof (loopCount)+sizeof (instructionCount);//除去指令类型标识符后的数据大小
public:
  explicit InstructionLoop();
  InstructionLoop(InstructionLoop const& instructionLoop);
  InstructionLoop& operator=(InstructionLoop const & instructionLoop);
  virtual ~InstructionLoop();
public:
  virtual QString toString()override;
  virtual QByteArray toByteArray() override;
  virtual InstructionLoop* clone()override;
  static ScriptInstruction* fromByteArray_InstructionLoop(char * const src,int size,int * offset);
public://geter and seter
  uint getLoopCount();
  InstructionLoop* setLoopCount(int loopCount);
  uint getInstructionCount();
  InstructionLoop* setInstructionCount(int instructionCount);
};
#endif
